Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print the number of tokens generated #6771

Merged
merged 2 commits into from
Nov 12, 2024

Conversation

helunwencser
Copy link
Contributor

@helunwencser helunwencser commented Nov 11, 2024

Stack from ghstack (oldest at bottom):

This is useful for verifying the correctness of AttentionSink.

Differential Revision: D65784095

This is useful for verifying the correctness of AttentionSink.

Differential Revision: [D65784095](https://our.internmc.facebook.com/intern/diff/D65784095/)

[ghstack-poisoned]
Copy link

pytorch-bot bot commented Nov 11, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/6771

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit 63b070d with merge base 623a9a6 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 11, 2024
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D65784095

@@ -91,10 +91,11 @@ def main() -> None:
else runner.text_completion(
prompt=args.prompt,
temperature=args.temperature,
echo=True,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

out of curiousity, what does echo=True do?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When it is true, the returned token list will include prompt tokens as well.

This is useful for verifying the correctness of AttentionSink.

Differential Revision: [D65784095](https://our.internmc.facebook.com/intern/diff/D65784095/)

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D65784095

@facebook-github-bot facebook-github-bot merged commit 1a5180e into gh/helunwencser/75/base Nov 12, 2024
39 of 41 checks passed
@facebook-github-bot facebook-github-bot deleted the gh/helunwencser/75/head branch November 12, 2024 00:58
lucylq pushed a commit that referenced this pull request Nov 12, 2024
Pull Request resolved: #6771

This is useful for verifying the correctness of AttentionSink.
ghstack-source-id: 252993225
@exported-using-ghexport

Differential Revision: [D65784095](https://our.internmc.facebook.com/intern/diff/D65784095/)

Co-authored-by: Lunwen He <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants